package com.example.config;

import feign.RequestInterceptor;
import feign.RequestTemplate;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class CustomFeignInterceptor implements RequestInterceptor {

    Logger logger = LoggerFactory.getLogger(this.getClass());
    @Override
    public void apply(RequestTemplate requestTemplate) {
        //记录日志
        requestTemplate.header("xxx","xxx");
        requestTemplate.query("id","1");
        requestTemplate.uri("/reduct");
        logger.info("feign拦截器");
    }
}
